<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="${ctxPath}/static/layui/css/layui.css" media="all">
</head>
<body background="/img/login.png">
<div class="layui-form" lay-filter="layuiadmin-form-sysRoleadmin" id="layuiadmin-form"
     style="padding: 20px;">
    <input type="hidden" value="${op}" id="op">
    <div class="layui-form-item">
        <label class="layui-form-label">角色ID</label>
        <div class="layui-input-block">
            <input type="text" id="id" name="id" required lay-verify="required" placeholder="请输入角色ID" autocomplete="off"
                   class="layui-input" value="${sysRole.id!}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">角色名称</label>
        <div class="layui-input-block">
            <input type="text" id="rolename" name="rolename" required lay-verify="required" placeholder="请输入角色名称" autocomplete="off"
                   class="layui-input" value="${sysRole.rolename!}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">角色描述</label>
        <div class="layui-input-block">
            <input type="text" name="description" placeholder="请输入角色描述" autocomplete="off"
                   class="layui-input" value="${sysRole.description!}">
        </div>
    </div>
    <div class="layui-form-item layui-hide">
        <input type="button" lay-submit lay-filter="LAY-SysRole-submit" id="LAY-SysRole-submit" value="确认">
    </div>
</div>
<script src="/static/layui/layui.js"></script>
<script>
    layui.config({
        base: '/static/'
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','form','laydate','upload'], function () {
        var $ = layui.$,
            form = layui.form,
            upload = layui.upload,
            laydate = layui.laydate;

        debugger;
        if ($("#op").val() == "") {
            $("#display").hide();
        };

        if ($("#op").val() == "view") {
            $("input").attr("readOnly", "true");
        }
    })
</script>
</body>
</html>